home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amoszine 9
/
Amoszine 9 (Disk 3 of 3).adf
/
Steves_ALister_Source.lha
/
alisterv4.amos
/
alisterv4.amosSourceCode
Wrap
AMOS Source Code
|
1992-03-06
|
2KB
|
83 lines
'ALister Steve Bye, Aug 95
'This snippet takes the ASCII text files that the Aminet Amos List
'distributes and cuts out all the crap in between messages.
'I enjoy reading the messages but it gets very tedious scrolling past 100s
'of k of crap.
'I would be happy to see improvements made to this, I can't
'be bothered as it does what I need it to and was only a 10 min
'jobbie. Send it in to AZ so I can see it though.
'bank 11 is used as a temp storage place
Reserve As Data 11,100000
'get the Amos List file & load it in bank 10
F$=Fsel$("")
Open In 1,F$
L=Lof(1)
Reserve As Data 10,L
Close 1
Bload F$,10
MARKER=0
COUNT=Start(10)
Do
'search for end of junk marker, this varies from list to list
'so change it if need be
S$="Status: RO"
ADR=Hunt(COUNT To Start(10)+Length(10),S$)
COUNT=ADR+10
'found junk string
If ADR>0
Inc HC : Print "Found start mess ";HC;" at ";ADR-Start(10)
'so look for next junk beginning string, same applies as above.
S$="From amos-request"
ADRF=Hunt(ADR+10 To Start(10)+Length(10),S$)
If ADRF>0
Inc ND
Print "found end mess ";ND;" at ";ADRF-Start(10)
'we are here so must of found marker
'now cut out the meat, the text we want with no crap.
'using Copy caused me probs by the way, this is fast enough though.
'Copy the text from 10 into bank 11.
For Z=ADR+10 To ADRF
Poke Start(11)+MARKER,Peek(Z)
Inc MARKER
Next Z
'check if bank 11 is nearly full
'If IT IS Save IT OUT
If MARKER>90000
Inc P
Gosub _SAVE
End If
End If
End If
'It's all over dudes so save what is left
If ADR<=0
Inc P
Bsave F$+Str$(P),Start(11) To Start(11)+MARKER
Erase 10
Erase 11
Stop
End If
Loop
_SAVE:
Bsave F$+Str$(P),Start(11) To Start(11)+MARKER
Erase 11
Reserve As Data 11,100000
MARKER=0
Return